@extends('Admin.layout.layout')
@section('title','门户管理')
@section('home','板块管理')
@section('weizhi','查看')
@section('con')


<header class="panel-heading" style="display:block;position:relative;height:40px">
   <font style="display:block;position:absolute;float:left"><font>门户板块列表</font></font>
    <div class="nav search-row" id="top_menu" style="position: absolute;float: left;margin-left: 100px;margin-top: 6px;">
        
        <ul class="nav top-menu">                    
            <li style="border:0px">
                <form class="navbar-form" method="get" action="{{url('/admin/portaltype/index')}}">
                    <input class="form-control" placeholder="Search" name="keywords" value="{{$data['keywords'] or ''}}" type="text">
                    <button class="btn btn-default"><span class="icon_cloud-upload_alt"></span><font><font class=""> 搜索</font></font></button>                        
                </form>
            </li>                    
        </ul>
                        
    </div>
</header>

<!-- 父级板块的列表 -->

<table class="table table-striped table-advance table-hover">
	<tbody>
	  <tr>
	     <th><i class="icon_profile"></i> 序号</th>
	     <th><i class="icon_calendar"></i> 板块名称</th>
	     <th><i class="icon_mail_alt"></i> img</th>
	     <th><i class="icon_pin_alt"></i>父级板块</th>
	     <th><i class="icon_mobile"></i> path</th>
	     <th><i class="icon_cogs"></i> 操作</th>
	  </tr>
	  @foreach($types as $k=>$v)
	  <tr>
	     <td>{{$count++}}</td>
	     <td>{{$v->name}}</td>
	     <td>{{$v->img}}</td>
	     <td>{{$v->pname}}</td>
	     <td>{{$v->path}}</td>
	     <td>
	      <div class="btn-group">
	      		<!-- 查看父级板块下的子版块详情 -->
	          <a class="btn btn-primary" href="{{url('admin/portaltype/scan',['id'=>$v->id])}}">查看</a>
	          <a class="btn btn-success" href="{{url('admin/portaltype/edit',['id'=>$v->id,'pid'=>$v->pid])}}">修改</a>
	          <a class="btn btn-danger" href="{{url('admin/portaltype/delete',['id'=>$v->id])}}">删除</a>
	      </div>
	      </td>
	  </tr>
      @endforeach                  
	</tbody>
</table>
<span style="color:red;font-size: 12px;">{{session('success')}}</span>
<span style="color:red;font-size: 12px;">{{session('error')}}</span>

<script type="text/javascript" src="/bootcss/admin/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
  $(".btn-danger").click(function(){
      res = confirm('确定要删除该条信息?');
      if(!res){
          return false;
      }
  });
</script>
@endsection